Fix tests on beta
authorAlex Crichton <alex@alexcrichton.com>
Wed, 7 Jun 2017 15:37:50 +0000 (08:37 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 7 Jun 2017 15:37:50 +0000 (08:37 -0700)
Had a few usages of `-Z` leak out of the nightly channel.

tests/build.rs

index f9296c2cef4ae4bd9de69d8d2322755c0c555bbd..0d533b406891df12af6bdab29d1de89c23df738d 100644 (file)
@@ -2358,6 +2358,8 @@ fn custom_target_dir() {
 
 #[test]
 fn rustc_no_trans() {
+    if !is_nightly() { return }
+
     let p = project("foo")
         .file("Cargo.toml", r#"
             [package]
@@ -2689,16 +2691,13 @@ r#"[ERROR] Could not match 'xml' with any of the allowed variants: ["Human", "Js
 
 #[test]
 fn message_format_json_forward_stderr() {
-    if is_nightly() { return }
-
     let p = project("foo")
         .file("Cargo.toml", &basic_bin_manifest("foo"))
         .file("src/main.rs", "fn main() { let unused = 0; }");
 
     assert_that(p.cargo_process("rustc").arg("--bin").arg("foo")
-                .arg("--message-format").arg("JSON").arg("--").arg("-Zno-trans"),
+                .arg("--message-format").arg("JSON"),
                 execs().with_status(0)
-                .with_stderr_contains("[WARNING] the option `Z` is unstable [..]")
                 .with_json(r#"
     {
         "reason":"compiler-message",
@@ -2729,7 +2728,7 @@ fn message_format_json_forward_stderr() {
             "test":false
         },
         "features":[],
-        "filenames":[],
+        "filenames":["[..]"],
         "fresh": false
     }
 "#));